//
//  TopCell.m
//  MoGuRadio
//
//  Created by dlios on 15-6-5.
//  Copyright (c) 2015年 mogu.com 蘑菇科技. All rights reserved.
//

#import "TopCell.h"

@interface TopCell ()

@end


@implementation TopCell

- (void)dealloc
{
    [_leftImageView release];
    [_rightImageView release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.leftImageView = [[UIImageView alloc] init];
        self.leftImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.contentView addSubview:self.leftImageView];
        [_leftImageView release];
        
        self.rightImageView = [[UIImageView alloc] init];
        self.rightImageView.contentMode = UIViewContentModeScaleAspectFit;
        [self.contentView addSubview:self.rightImageView];
        [_rightImageView release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat width = self.contentView.bounds.size.width / 2;
    CGFloat height = self.contentView.bounds.size.height;
    
    self.leftImageView.frame = CGRectMake(0 + 5, 0, width - 10, height);
    self.rightImageView.frame = CGRectMake(192, 0, width - 10, height);
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
